R9 285 VCE corruption since drm/amdgpu/gmc8: use the vram location programmed by the vbios
https://bugs.freedesktop.org/show_bug.cgi?id=102296
Bug ID: 102296
Summary: R9 285 VCE corruption since drm/amdgpu/gmc8: use the
vram location programmed by the vbios
Product: DRI
Version: DRI git
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: DRM/AMDgpu
Assignee: [email protected]
Reporter: [email protected]
Bit late with this, bisected on drm-next-4.13-wip
R9 285 Tonga I am getting corrupted output from VCE encode, omx or vaapi since below commit.
To re-produce this you need to use gstreamer and encode "fast and large" eg. 2160p from raw nv12.
Slow things like ffmpeg or gst-vaapi without ! queue ! seem to hide the issue somewhat.
26d4ac55d2260f8685475b3f6e76e276a238cca7 is the first bad commit commit 26d4ac55d2260f8685475b3f6e76e276a238cca7
Author: Alex Deucher <[email protected]> Date: Tue Nov 1 13:08:33 2016 -0400
drm/amdgpu/gmc8: use the vram location programmed by the vbios
This makes mc programming much simpler in future patches.
Since evergreen, the vbios has been programming the fb location to the proper vram size. The only reason to reprogram it would be to change the location.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=102296
--- Comment #1 from Alex Deucher <[email protected]> --- Please attach your dmesg output. Are there any error messages in the output?
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=102296
--- Comment #2 from Andy Furniss <[email protected]> --- diff of (cut) dmesg-good dmesg-bad shows amongst other things
< amdgpu 0000:01:00.0: VRAM: 2048M 0x0000000000000000 - 0x000000007FFFFFFF (2048M used)
< amdgpu 0000:01:00.0: GTT: 3072M 0x0000000080000000 - 0x000000013FFFFFFF
---
Quoted 2 lines
amdgpu 0000:01:00.0: VRAM: 2048M
0x000000F400000000-0x000000F47FFFFFFF(2048M used) amdgpu 0000:01:00.0: GTT: 3072M0x0000000000000000-0x00000000BFFFFFFF
826c826
< [drm] PCIE GART of 3072M enabled (table at 0x0000000000040000).
---
Quoted 1 line
[drm] PCIE GART of 3072M enabled (table at
0x000000F400040000).
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=102296
--- Comment #3 from Andy Furniss <[email protected]> --- Created attachment 133608
--> https://bugs.freedesktop.org/attachment.cgi?id=133608&action=edit
dmesg on bad
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=102296
--- Comment #4 from Andy Furniss <[email protected]> --- Created attachment 133609
--> https://bugs.freedesktop.org/attachment.cgi?id=133609&action=edit
dmesg on good (commit before bad dmesg)
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=102296
--- Comment #5 from Alex Deucher <[email protected]> --- Created attachment 133610
--> https://bugs.freedesktop.org/attachment.cgi?id=133610&action=edit
possible fix
Does this patch help?
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=102296
--- Comment #6 from Andy Furniss <[email protected]> --- Created attachment 133611
--> https://bugs.freedesktop.org/attachment.cgi?id=133611&action=edit
dmesg with patch
No, the encode fails differently though, throwing lots of
amdgpu: The CS has been cancelled because the context is lost.
and in dmesg
[ 103.116736] [drm:amdgpu_vce_cs_reloc [amdgpu]] *ERROR* BO to small for addr
0x010cf1e000 156 155
This is actually familiar looking as current mesa + vaapi would do this since a patch from march.
I am testing this using OMX and have never see that do it before. The issue I bisected was outputting with no errors from the encoder, a corrupt stream - it was playable and looked good to start with, it just degraded as time went on with the decoder throwing h264 errors.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=102296
Alex Deucher <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #133610|0 |1
is obsolete| |
--- Comment #7 from Alex Deucher <[email protected]> --- Created attachment 133612
--> https://bugs.freedesktop.org/attachment.cgi?id=133612&action=edit
possible fix v2
Whoops, the original patch had a typo in it. Does this simplified version work any better?
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=102296
--- Comment #8 from Andy Furniss <[email protected]> --- Created attachment 133613
--> https://bugs.freedesktop.org/attachment.cgi?id=133613&action=edit
dmesg with v2 patch
No luck with v2.
The errors are gone, but the original issue is the same.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=102296
--- Comment #9 from Christian König <[email protected]> --- Already following this Alex, but not the slightest idea either.
Andy could you for a test disable multiple instance support in VCE (I need to dig through the Mesa source as well, but I think Leo asked that multiple times so you might know of hand).
Apart from that I would say lets dump all the calculated addresses with good and bad and see what is different.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=102296
--- Comment #10 from Andy Furniss <[email protected]> --- Disabling dual instance does avoid it.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=102296
--- Comment #11 from Andy Furniss <[email protected]> ---
This seems work OK on current drm-next-4.15-wip, don't know if it's luck or not yet. Perf is very slightly lower and I haven't been testing every iteration of new kernels due to testing vce stuff.
There is also an unrelated to vce, powerplay/display regression on this kernel, which I'll try to find later and file a bug.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=102296
--- Comment #12 from Andy Furniss <[email protected]> --- Oops the issue does still exist.
I pasted the wrong command line, which also explains why it was slightly slower.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=102296
--- Comment #13 from Andy Furniss <[email protected]> --- Re-reading this I notice I didn't paste the full diff between good and bad so here's a bit more -
diff good bad though other rings do vary a bit in the second field, ring 12 (VCE?) is the only one that's different in the first field.
< amdgpu 0000:01:00.0: fence driver on ring 12 use gpu addr 0x0000000000821f40, cpu addr 0xffffc9000364ef40
---
Quoted 1 line
amdgpu 0000:01:00.0: fence driver on ring 12 use gpu addr
0x000000f400821f40, cpu addr0xffffc9000104ef40
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=102296
Andy Furniss <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED--- Comment #14 from Andy Furniss <[email protected]> --- OK with current 4.17-wip
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=102296
Christian König <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED
--- Comment #15 from Christian König <[email protected]> --- Good that we finally found the root cause and thanks for testing.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel